home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 41
/
Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso
/
Aminet
/
comm
/
net
/
tf02.lha
/
TinyFugue
/
tf-lib
/
psh.tf
< prev
next >
Wrap
Text File
|
1995-08-12
|
583b
|
18 lines
;;; preferred shell
;; /psh [<command>]
;; Like /sh, but uses ${SHELL} instead of /bin/sh to execute <command>.
;; bug: barfs on suspend (^Z) because SHELL is really a child of /bin/sh,
;; which doesn't have job control. Workaround: don't ^Z during /psh.
/~loaded pref-shell.tf
/def -i psh = \
/if ( ({#} > 0) & (SHELL !~ "") & (SHELL !~ "/bin/sh") ) \
/setenv ARGS=%*%;\
/def -i -hSHELL -1 -agG ~psh_hook = \
/echo %% Executing %{SHELL} command: %%{ARGS}%;\
/@sh exec %{SHELL} -i -c "$$ARGS"%;\
/else \
/@sh %*%;\
/endif